RSpec.configure do |config|
  config.treat_symbols_as_metadata_keys_with_true_values = true
  config.run_all_when_everything_filtered = true
end

require 'wegolint'

def should_have_error message, line_number, language
  message = build_error_message message, line_number, language
  subject.errors.should include message
end

def should_not_have_error message, line_number, language
  message = build_error_message message, line_number, language
  subject.errors.should_not include message
end

def build_error_message message, line_number, language
  { message: message, line_number: line_number }
end

